﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="RestaurantList.aspx.vb" Inherits="ItalianRestaurantLondon.RestaurantList" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
 <p class="headerText"> List of Restaurants</p>
    <p>
    <br />
        <asp:Button ID="Button1" runat="server" Text="Add New Restaurant" 
            PostBackUrl="~/AddNewRestaurant.aspx" />
</p>
    <p>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            DataKeyNames="ID" DataSourceID="RListDataSource1" AllowSorting="True">
            <Columns>
                <asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" 
                    ReadOnly="True" SortExpression="ID" />
                <asp:ImageField 
                    DataImageUrlField="RestaurantPicture" HeaderText="Thumbnail">
                    <ControlStyle CssClass="RestaurantPicture" />
                </asp:ImageField>
                <asp:HyperLinkField DataNavigateUrlFields="ID" 
                    DataNavigateUrlFormatString="Details.aspx?ID={0}" 
                    DataTextField="RestaurantName" HeaderText="Restaurant Name" SortExpression="RestaurantName" />
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="RListDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
            SelectCommand="SELECT [RestaurantName], [RestaurantPicture], [ID] FROM [Restaurants]">
        </asp:SqlDataSource>
</p>
    <p>
        &nbsp;</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
</asp:Content>
